package com.ruoyi.ade.llm.chunk;

public class ChunkByMarkRequest extends IAbstractChunkRequest{

    /**
     * 需要分割的标点符号   eg. ",。？"  按照标点符号分割句子
     */
    private String marks = "，,。";
    /**
     * 输出chunk,每个chunk的句子数，滑动窗口模式
     */
    private int windowSize = 3;
    /**
     *  滑动窗口步进距离(句子数)
     */
    private int step = 1;
    /**
     *  每个chunk是否要进一步排列组合
     *  eg:  假设windowSize为3  找到一个chunk: A,B,C (A,B,C是分割后的句子)
     *       如果要进一步排列组合，那么将进一步拆分出更多chunk:   A,B,C,AB,BC,ABC
     */
    private boolean plzh = false;

    /**
     * 输出的最小的chunk长度要求  默认5
     */
    private int minChunckSize = 5;


    public ChunkByMarkRequest(String marks, int windowSize, int step, boolean plzh, int minChunckSize) {
        this.marks = marks;
        this.windowSize = windowSize;
        this.step = step;
        this.plzh = plzh;
        this.minChunckSize = minChunckSize;
    }

    public static ChunkByMarkRequest getDefault(){
        return new ChunkByMarkRequest("，,。?；;？",3,3,false,5);
    }

    public String getMarks() {
        return marks;
    }

    public void setMarks(String marks) {
        this.marks = marks;
    }

    public int getWindowSize() {
        return windowSize;
    }

    public void setWindowSize(int windowSize) {
        this.windowSize = windowSize;
    }

    public int getStep() {
        return step;
    }

    public void setStep(int step) {
        this.step = step;
    }

    public boolean isPlzh() {
        return plzh;
    }

    public void setPlzh(boolean plzh) {
        this.plzh = plzh;
    }

    public int getMinChunckSize() {
        return minChunckSize;
    }

    public void setMinChunckSize(int minChunckSize) {
        this.minChunckSize = minChunckSize;
    }
}

